﻿using System.ComponentModel.DataAnnotations;

namespace WhutDoomCheck.Server.Entities
{
    /// <summary>
    /// 辅导员
    /// </summary>
    public class Counsellor
    {
        [Key, Required]
        public string Id { get; set; } = null!;

        [Required]
        public string Name { get; set; } = null!;

        public IList<Student> Students { get; set; } = null!;

        public override bool Equals(object? obj)
        {
            if (obj is not Counsellor another) return false;
            return another.Id == this.Id;
        }

        public override int GetHashCode()
        {
            return $"{Id}".GetHashCode();
        }
    }
}
